#include <iostream>
using namespace std;
class Data{
public:
    Data(){}
    ~Data(){}
private:
    int data;
};
class middlelayer{
public:
    middlelayer(Data*ptr)
    :_ptr(ptr)
    {

    }
    ~middlelayer(){
        delete _ptr;
        _ptr=nullptr;
    }
private:
    Data* _ptr;
};

void test(){
    middlelayer ptr(new Data());
}
int main(int argc, char * argv[]){
    
    return 0;
}

